const prodPlugin = [];
// 如果是生产环境，则自动清理掉打印的日志，但保留error 与 warn
if (process.env.VUE_APP_HOST === 'prd') {
	prodPlugin.push([
		'transform-remove-console',
		{
			exclude: ['error', 'warn']
		}
	]);
}

module.exports = {
	presets: ['@vue/app'],
	plugins: [
		[
			'import',
			{
				libraryName: 'vant',
				libraryDirectory: 'es',
				style: name => `${name}/style/less`
			},
			'vant'
		],
		...prodPlugin
	]
};
